<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #l1{
            color: green;
        }
        .c2{
            color: yellow;
        }
        body>p,input[type="text"]{
            background-color: red;
        }
        body >div>div>p{
            color: hotpink;
        }
        body div div p{
            background-color: cornflowerblue;
        }
        a:link{ color: green}
        a:visited{ color: red}
        a:hover{ color: yellow}
        a:active{ color: cornflowerblue}
    </style>
</head>
<body>
<ul>
    <li>刘备</li>
    <li id="l1">关羽</li>
    <li class="c2">张飞</li>
</ul>
<p>香蕉</p>
<p class="c2">苹果</p>
<input type="text">  <input type="password">
<div>
    <p>p1</p>
    <div><p>p2</p></div>
    <div><div><p>p3</p></div></div>
</div>
<a href="http://www.tedu.cn">达内官网</a>
<a href="http://www.baidu.com">百度</a>
</body>
</html>